home *** CD-ROM | disk | FTP | other *** search
- <html>
-
- <head>
-
- <title>Script Dilemma</title>
-
- </head>
-
- <script>
-
- <!--//
-
- function usrMessage(st) {
-
- return prompt('Parent Window\n' + st, '');
-
- }
-
- //--->
-
- </script>
-
- <body bgcolor="white">
-
- <layer id="first" width=100 height=40 top=0 left=0>
-
- <script>
-
- <!--//
-
- function usrMessage(st) {
-
- return prompt('document.layers[\'first\'].document.layers[\'firstsub\'].\n' + st, '');
-
- }
-
- //--->
-
- </script>
-
- </layer>
-
-
-
- <layer id="second" width=100 height=40 top=45 left=0>
-
- <layer id="secondsub" width=96 height=36 top=2 left=2>
-
- <layer id="subchild1" width=50 height=30 top=3 left=3>
-
- <!--this one calls the usrMessage in the first document layer -->
-
- <a href="javascript:alert('Hi ' + document.layers['first'].usrMessage('What\'s Your Name?')+'!')">CLICK</a>
-
- <!--this one calls the usrMessage at the head of the document -->
-
- <a href="javascript:alert('Hi ' + usrMessage('What\'s Your Name?')+'!')">HERE</a>
-
- </layer>
-
- </layer>
-
- </layer>
-
-
-
- </body>
-
- </html>
-
-